package Page.DetailPage;

import javafx.beans.property.SimpleStringProperty;
import javafx.beans.property.StringProperty;

public class DetailPageViewModel {
    private final StringProperty title = new SimpleStringProperty();
    private final StringProperty info = new SimpleStringProperty();
    private final StringProperty content = new SimpleStringProperty();

    private static final DetailPageViewModel viewModel = new DetailPageViewModel();

    public StringProperty getTitleProperty(){
        return title;
    }

    public StringProperty getInfoProperty(){
        return info;
    }

    public StringProperty getContentProperty(){
        return content;
    }

    public void setTitle(String title){
        this.title.set(title);
    }

    public void setInfo(String info){
        this.info.set(info);
    }

    public void setContent(String content){
        this.content.set(content);
    }

    // 获取实例
    public static DetailPageViewModel getViewModel(){
        return viewModel;
    }
}